package com.xzmd.md_city.mapper;

import com.xzmd.md_city.entity.ProductInfo;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:Corday
 * @Date:2021/07/10/20:29
 */

@Mapper
public interface ProductInfoMapper {
    //查询所有商品
    @Select("select * from product_info;")
    public List<ProductInfo> selectAllProducts();
//    通过id号查询商品
    @Select("select * from product_info where id=#{id};")
    public ProductInfo selectProudctById(@Param("id") int id);
}
